package com.cc.config;

import org.springframework.context.annotation.*;
import org.springframework.stereotype.Controller;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import org.springframework.web.bind.annotation.RestController;


@Configuration
@ComponentScan(
        //指定要扫描的包
        basePackages = "com.cc",
        //扫描除了Controller的类
        excludeFilters = {
                @ComponentScan.Filter(type = FilterType.ANNOTATION,classes = Controller.class),
                @ComponentScan.Filter(type = FilterType.ANNOTATION,classes = RestController.class)

        }
)

@PropertySource("classpath:jdbc.properties")
@Import({JdbcConfig.class, MyBatisConfig.class})
@EnableAspectJAutoProxy//开启APO
@EnableTransactionManagement//事务
public class SpringConfig {
}
